package com.example.szh.widget;

import android.content.Context;

import androidx.annotation.Nullable;

import com.yanyusong.y_divideritemdecoration.Y_Divider;
import com.yanyusong.y_divideritemdecoration.Y_DividerBuilder;
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration;

public class VideoNewsItemDecoration extends Y_DividerItemDecoration {
    public VideoNewsItemDecoration(Context context) {
        super(context);
    }

    @Nullable
    @Override
    public Y_Divider getDivider(int itemPosition) {
        Y_Divider divider=null;
        if (itemPosition%2==0){
            divider=new Y_DividerBuilder()
                    .setRightSideLine(true,0xffffff,1,0,0)
                    .setBottomSideLine(true,0xffffff,1,0,0)
                    .create();
        }else {
            divider=new Y_DividerBuilder()
                    .setBottomSideLine(true,0xffffff,1,0,0)
                    .create();
        }
        return divider;
    }
}
